home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 12⁄1⁄89 / 0378-Cloning and MacApp-Jan90 < prev    next >
Encoding:
Text File  |  1990-01-12  |  1.2 KB  |  35 lines  |  [TEXT/GEOL]

  1. Item    2513264                         10-Jan-90        08:51
  2.  
  3. From:   ALGER                           Alger, Jeff,VCA
  4.  
  5. To:     FRIEDRICH1                      Friedrich, Steve
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Cloning and MacApp
  10.  
  11. Steve,
  12.  
  13. I would propose as a general guideline for use of deep cloning in MacApp the
  14. following:
  15.  
  16. The default behavior of the Clone method should be to duplicate all 'owned'
  17. objects and to only duplicate references to 'non-owned' objects.  Object A is
  18. owned by object B if A is normally created by or specifically for the benefit
  19. of B, and more particularly if A is destroyed when B is destroyed.  A non-owned
  20. object is any object which is not owned (sorry - the mathematician in me coming
  21. out.)
  22.  
  23. For example, the next event handler should clearly not be cloned by a
  24. TEvtHandler, since it is non-owned.  Cloning a TDocument, however, probably
  25. SHOULD duplicate windows, views, and fDocPrintHandler.  Finally, TLegBone would
  26. 'own' TThighBone, but TShinBone would not.
  27.  
  28. This strategy is obviously subject to refinement in a subclass, but is the most
  29. generally useful default behavior I can think of.
  30.  
  31. Regards,
  32. Jeff Alger
  33. KPMG Peat Marwick
  34.  
  35.